home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000068_icon-group-sender _Mon Sep 26 14:33:11 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 26 Sep 1994 08:48:36 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: Mon, 26 Sep 1994 14:33:11 GMT
  4. From: plat@let.rug.nl (Bert Plat)
  5. Message-Id: <1994Sep26.143311.10704@let.rug.nl>
  6. Organization: Faculteit der Letteren, Rijksuniversiteit Groningen, NL
  7. Sender: icon-group-request@cs.arizona.edu
  8. Subject: Problem reading block of text
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11. Even though I've managed to work around it, I would like to hear 
  12. *the* ICON solution to the following problem:
  13.  
  14. I have a file of text, containing separate entities, each of 
  15. which starts with a colon. I.e.:
  16.  
  17. :start of entity
  18. lines and
  19. lines and 
  20. more lines of text
  21.  
  22. :start of next entity
  23. lines
  24. lines
  25. and more lines
  26.  
  27.  
  28. Now, what is the most elegant and ICONesque way to obtain 
  29. these entities one by one? I've worked around it by concatenating
  30. lines, suspend when match(":", line), then resuming with line := 
  31. inline || "\n", but I wonder if there's a better way. What if,
  32. for example, I want to build an array of strings?
  33.  
  34. best,
  35.  
  36. -- 
  37.  .
  38.    . . Bert Plat (bplat@rugrcx.rug.nl) . .
  39.                                           . . . . . . . . . . . . . . . 
  40.